<template>
	<view class="h-screen flex flex-col">
		<web-view :webview-styles="webviewStyles" :src="src"></web-view>
	</view>
</template>
<script setup>
	import {
		ref,
		computed
	} from 'vue';
	const {
		type,
	} = defineProps(['type'])

	const webviewStyles = ref({
		progress: {
			color: '#329EFF'
		}
	})

	const src = computed(() => {
		if (type == 1) {
			return 'http://zzapp.shudong52.com/policy.html'
		} else if (type == 2) {
			return 'http://zzapp.shudong52.com/zhuce.html'
		} else if (type == 3) {
			return 'http://zzapp.shudong52.com/platformrules.html'
		} else {
			return ''
		}
	})

	const title = computed(() => {
		if (type == 1) {
			return '隐私政策'
		} else if (type == 2) {
			return '用户注册协议'
		} else {
			return ''
		}
	})
	const back = () => {
		uni.navigateBack({
			delta: 1
		})
	}
</script>
<style lang="scss" scoped>
</style>